import { ref, reactive } from '@vue/composition-api';
// @ts-ignore
const pageSize = Math.min((window.innerHeight - 140) / 66 || 0, 30);
export function useStateDetail() {
  const limit = ref(pageSize);
  const curPos = ref('');
  const more = ref(true);
  const count = ref(5);
  const state = {
    limit: limit.value,
    /** 数据分页游标位置 */
    curPos: curPos.value,
    /** 是否有更多页 */
    more: more.value,
    count: count.value,
  };
  const states = reactive({ ...state });

  return states;
}
